import React from 'react';
import { createForm } from 'rc-form';
import { Tabs, WhiteSpace } from 'antd-mobile';
const TabPane = Tabs.TabPane;

function callback(key) {
    console.log(key);
}

class GoodsDetails extends React.Component {

    state = {
        data: ['', '', ''],
        imgHeight: 176,
    }
    componentDidMount() {
        this.props.changeTitle('商品详情');
        // simulate img loading
        setTimeout(() => {
            this.setState({
                data: ['AiyWuByWklrrUDlFignR', 'TekJlZRVCjLFexlOCuWn', 'IJOtIlfsYdTyaDTRVrLI'],
            });
        }, 100);
    }

    // componentWillMount(){
    //     userMsg = this.props.location.state
     // }

    render() {
        return (
            <div>
                {/*<GoodsCarousel />*/}
                <Tabs defaultActiveKey="1" onChange={callback}>
                    <TabPane tab="选项卡一" key="1">
                        <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '5rem', backgroundColor: '#fff' }}>
                            选项卡一内容
                            {/*<Goods />*/}
                        </div>
                    </TabPane>
                    <TabPane tab="选项卡二" key="2">
                        <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '5rem', backgroundColor: '#fff' }}>
                            选项卡二内容
                        </div>
                    </TabPane>
                </Tabs>
                <WhiteSpace />
            </div>
        );
    }
}

export default createForm()(GoodsDetails);
